feat: Update strings and add new key#2372
Conversation
|
@greptile |
Greptile SummaryThis PR adds localized display strings for terminal cursor style, inactive cursor style, font weight, and quicktools trigger mode dropdowns — replacing hardcoded English labels with
Confidence Score: 5/5Safe to merge; the core fixes are correct and no functional regressions are introduced The main corrections — using [value, label] tuples for all terminal select arrays and restoring the missing "outline" option — are correct and complete. The one open item is a cosmetic display inconsistency in the quicktools trigger mode setting for non-English users (valueText still shows the capitalized stored key rather than the translated label), but this does not affect stored values or runtime behavior. src/settings/appSettings.js — the valueText function for quickToolsTriggerMode should be updated to return the localized label rather than the capitalized stored value Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[User opens Settings dropdown] --> B{Select array item}
B --> C["[value, label] tuple\ne.g. ['block', strings['terminal:block']]"]
C --> D[Stored value = xterm.js enum\ne.g. 'block']
C --> E[Displayed label = localized string\ne.g. 'Blok' in Indonesian]
D --> F[appSettings.update\nkey: cursorStyle / fontWeight / etc.]
F --> G[updateActiveTerminals]
G --> H[terminal.options.cursorStyle = 'block'\nxterm.js recognizes enum ✅]
I[valueText for quickToolsTriggerMode] --> J["value.capitalize()\ne.g. 'click' → 'Click' (always English)"]
J --> K[Settings list shows 'Click'\neven if locale label is 'Klik' ⚠️]
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
flowchart TD
A[User opens Settings dropdown] --> B{Select array item}
B --> C["[value, label] tuple\ne.g. ['block', strings['terminal:block']]"]
C --> D[Stored value = xterm.js enum\ne.g. 'block']
C --> E[Displayed label = localized string\ne.g. 'Blok' in Indonesian]
D --> F[appSettings.update\nkey: cursorStyle / fontWeight / etc.]
F --> G[updateActiveTerminals]
G --> H[terminal.options.cursorStyle = 'block'\nxterm.js recognizes enum ✅]
I[valueText for quickToolsTriggerMode] --> J["value.capitalize()\ne.g. 'click' → 'Click' (always English)"]
J --> K[Settings list shows 'Click'\neven if locale label is 'Klik' ⚠️]
Reviews (4): Last reviewed commit: "fix: outline translations" | Re-trigger Greptile |
Greptile SummaryThis PR adds new i18n string keys for terminal cursor style, font weight, quicktools trigger mode, and language completion settings, with full translations in
Confidence Score: 3/5Not safe to merge as-is — changing cursor style or font weight in terminal settings will silently persist an unrecognized value, leaving the terminal cursor appearance stuck regardless of what the user selects. The cursor style, inactive cursor style, and font weight settings now store localized display strings (e.g. "Block", "Normal") directly into app settings instead of the lowercase xterm.js enum values those fields require. Any user who touches those options in the UI will end up with a broken setting that xterm.js ignores. The fix is straightforward — wrap each option in a [value, label] tuple — but until that is done the terminal settings panel actively mis-configures the terminal for users who interact with it. src/settings/terminalSettings.js needs the cursorStyle, cursorInactiveStyle, and fontWeight selects reworked to use [value, label] tuples. src/lang/index.d.ts needs to be regenerated with Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[User opens Terminal Settings] --> B[Selects cursor style option]
B --> C{Select format}
C -->|Current: bare string| D["Stores localized text\ne.g. 'Block' / 'Blok'"]
C -->|Expected: value+label tuple| E["Stores xterm.js enum\ne.g. 'block'"]
D --> F[appSettings.update cursorStyle = 'Block']
E --> G[appSettings.update cursorStyle = 'block']
F --> H[updateActiveTerminals]
G --> H
H --> I[terminal.options.cursorStyle = value]
I -->|'Block' not recognized| J["❌ xterm.js ignores value\nCursor unchanged"]
I -->|'block' valid| K["✅ Cursor style applied"]
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
flowchart TD
A[User opens Terminal Settings] --> B[Selects cursor style option]
B --> C{Select format}
C -->|Current: bare string| D["Stores localized text\ne.g. 'Block' / 'Blok'"]
C -->|Expected: value+label tuple| E["Stores xterm.js enum\ne.g. 'block'"]
D --> F[appSettings.update cursorStyle = 'Block']
E --> G[appSettings.update cursorStyle = 'block']
F --> H[updateActiveTerminals]
G --> H
H --> I[terminal.options.cursorStyle = value]
I -->|'Block' not recognized| J["❌ xterm.js ignores value\nCursor unchanged"]
I -->|'block' valid| K["✅ Cursor style applied"]
|
|
@greptile |
|
@greptile I have fixed the font weight |
|
The fix looks great. All three original issues are now resolved:
Everything looks correct now. |
|
@greptile |
|
Ready to be reviewed if this PR is useful |
Features
language package completionsettings-info-editor-language-completionrecommend extensionssettings-info-editor-recommend-extensionsextension recommendation titleextension recommendation messageextension request titleextension request messagesearch pluginsrequest pluginterminal:blockterminal:underlineterminal:barterminal:inactive blockterminal:inactive underlineterminal:inactive barterminal:inactive noneterminal:normalterminal:boldquicktools-trigger:clickquicktools-trigger:touchsettings-info-terminal-uninstallnote: For languages other than id-id.json I fallback to English